#! /bin/sh
#./script-filtrosclienteCliente.sh ip-cliente ip-servidor ServidoPort

#previamente genere el archivo "traza-cliente.dmp" con
#tshark -i eth0 -w traza-cliente.dmp > as &

#pkill tshark

#ACKs normales
tshark -R "(ip.src==$1) && (ip.dst==$2)  and (tcp.flags.syn == 0) and !(tcp.len > 0) and (tcp.flags.fin == 0)  and (tcp.port == $3) and !(tcp.analysis.duplicate_ack)" -T fields -e frame.time_relative -e tcp.ack -r /tmp/traza-cliente.dmp > datos/acks2.txt #ACKs

#ACKs Duplicados
tshark -R "(ip.src==$1) && (ip.dst==$2)  and (tcp.flags.syn == 0) and !(tcp.len > 0) and (tcp.flags.fin == 0) and (tcp.port == $3) and (tcp.analysis.duplicate_ack)" -T fields -e frame.time_relative -e tcp.ack -e tcp.analysis.duplicate_ack_num -r /tmp/traza-cliente.dmp > datos/acks-dup2.txt #ACKs Duplicados
